<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // 通过数组记录一组书籍的信息(书名、价格)
        let books = [
            // 数组中以对象作为元素组合的合集
            {
                name:"js从入门到放弃",
                price:56.8,
                menus:[
                    "1.xxxx",
                    "2.xxxx",
                    "3.xxxx"
                ]
            },
            {
                name:"java从入门到放弃",
                price:46.8,
                menus:[
                    "1.yyyy",
                    "2.yyyy",
                    "3.yyyy"
                ]
            },
            {
                name:"mysql从入门到放弃",
                price:96.8,
                menus:[
                    "1.dddd",
                    "2.dddd",
                    "3.dddd"
                ]
            },
        ];

        for (let i = 0; i < books.length; i++) {
            console.log( books[i] , books[i].name , books[i].price );
            // books[i].menus
            for (let j = 0; j < books[i].menus.length; j++) {
                console.log( books[i].name,"章节包含",books[i].menus[j] );
            }
        }
    </script>
</head>
<body>
    
</body>
</html>